package com.liezh.publisherobserver;

/**
 * @author liezh
 * @date 2021-10-29
 */
public class Main {
    public static void main(String[] args) {
        MsgObserver o1 = new MsgObserverImpl1();
        MsgObserver o2 = new MsgObserverImpl2();

        Subject subject = new MessagePublisher();
        subject.attach(o1);
        subject.attach(o2);
        Msg msg = new Msg("111");
        subject.notify(msg);

    }
}
